<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="UTF-8">
		<title>个人中心</title>
		<link rel="stylesheet" type="text/css" th:href="@{css/newstyle.css}">
		<script type="text/javascript" th:src="@{/js/jquery.js}"></script>
		<style>
			#select{
				height: 30px;
				background: #fbfbfb;
				border: 1px solid rgba(168, 162, 162, 0.18);
				font-family: 'Tahoma','simsun' !important;
				color: #747d87;
				margin: 0;
			}
		</style>
	</head>
	<body>

	<div th:replace="frontdesk/common :: categirymenu"></div>
	<!-- self_info -->
	<div class="grzxbj">
		<div class="selfinfo center">
		<div class="lfnav fl">
			<div class="ddzx">个人中心</div>
			<div class="subddzx">
				<ul>
					<li><a href="#" style="color: red;font-weight:bold;">个人信息</a></li>
					<li><a href="">消息通知</a></li>
					<li><a href="">优惠券</a></li>
					<li><a href="">收货地址</a></li>
				</ul>
			</div>
			<div class="ddzx">订单中心</div>
			<div class="subddzx">
				<ul>
					<li><a th:href="@{/orders}" >我的订单</a></li>
					<li><a href="">意外保</a></li>
					<li><a href="">团购订单</a></li>
					<li><a href="">评价晒单</a></li>
				</ul>
			</div>
		</div>
		<div class="rtcont fr">
			<div class="grzlbt ml40">我的资料</div>
			<div class="subgrzl ml40"><span>昵称</span><span th:text="${user.username}"></span><span><a href="">编辑</a></span></div>
			<div class="subgrzl ml40"><span>手机号</span><span th:text="${user.phoneNum}"></span><span><a href="">编辑</a></span></div>
			<div class="subgrzl ml40"><span>收货地址</span><span>天津市西青区精武镇宾水西道天津市大学软件学院</span><span><a href="">编辑</a></span></div>
			<div class="subgrzl ml40"><span>学生</span><span><select id="select"><option th:each="student:${students}" th:text="${student.name}" th:value="${student.id}"></option></select></span><span><a href="">编辑</a></span></div>
			<script>
				$("#select").change(function(){
					var opt=$("#select").val();
					var name=$("#select option:selected").text();
					$.ajax({
						url: "/saveStu",
						data: {'id': opt},
						method: "post",
						success: function (data) {
							if (data == 'success') {
								alert("已选择"+name);
							} else {
								alert("请选择！");
							}
						}
					});
				});
			</script>
		</div>
		<div class="clear"></div>
		</div>
	</div>
	<!-- self_info -->
		
		<footer class="mt20 center">
		   <div class="mt20"></div>
		   <div>neweast.com 京ICP证110507号 京ICP备10046444号 京公网安备11010802020134号 京网文[2014]0059-0009号</div> 
		   <div>违法和不良信息举报电话：123-456-789，本网站所列数据，除特殊说明，所有数据均出自我司实验室测试</div>
		  </footer>
	</body>
</html>